﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Entity;
using Business.IManager;
using DataAccess.IService;
using DataAccess.Service;

namespace Business.Manager
{
    public class NetworkPortManager:INetworkPortManager
    {
        INetworkPortService portService = new NetworkPortService();
        public NetworkPort getNetworkPortInform(string stuId)
        {
            NetworkPort port = portService.selectPortInfor(stuId);
            if(port.Status.Equals("当前可用")){
                port.AvaliableEndTime = port.AvailableBeginTime.AddMonths(port.AvailableLastMonth);
            }
            //在数据库中加个函数，到达日期，就置状态为不可用,month置为0
            return port;
        }

    }
}
